package com.example.controller;

import com.example.pojo.SysDept;
import com.example.service.ISysDeptService;
import com.example.servicelmp.SysDeptServiceImp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/dept")
@CrossOrigin
public class SysDeptController {
    @Autowired(required = false)
    ISysDeptService sysDeptService;

    @RequestMapping("one")
    public SysDept sysDeptOne(){
        return sysDeptService.sysDeptOne(103);
    }

    @RequestMapping("list")
    public java.util.List<SysDept> sysDeptList(){
        return sysDeptService.sysDeptList();
    }
}
